package com.jr.controller;


import com.jr.entry.Resume;
import com.jr.service.ResumeService;
import com.jr.util.ResultObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Resume/")
public class ResumeController {
    @Autowired
    private ResumeService resumeService;

    @Autowired
    private ResultObject resultObject;

    @RequestMapping("add1")
    public ResultObject add(Resume resume){
        System.out.println(123456778);
        System.out.println(resume);
        boolean b = resumeService.addResume(resume);
        if (b){
            resultObject.setStatus(400);
            resultObject.setResult("添加成功");
        }else {
            resultObject.setStatus(404);
            resultObject.setResult("添加失败");
        }
        return resultObject;
    }
}
